package cn.well.cloud.modular.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 微信用户
 * </p>
 *
 * @author jiawei
 * @since 2020-06-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("biz_user_info")
@ApiModel(value="UserInfo对象", description="微信用户")
public class UserInfo extends Model<UserInfo> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "用户id")
    @TableId(value = "user_info_id", type = IdType.ID_WORKER)
    private Long userInfoId;

    @ApiModelProperty(value = "openId")
    @TableField("openId")
    private String openId;

    @ApiModelProperty(value = "unionID,只有绑定到同一开放平台下的公众号才拥有")
    @TableField("unionID")
    private String unionID;

    @ApiModelProperty(value = "用户昵称")
    @TableField("user_info_name")
    private String userInfoName;

    @ApiModelProperty(value = "用户头像")
    @TableField("head_url")
    private String headUrl;

    @ApiModelProperty(value = "所属微信")
    @TableField("wx_type")
    private String wxType;

    @ApiModelProperty(value = "是否关注")
    @TableField("subscribe")
    private Integer subscribe;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


    @Override
    protected Serializable pkVal() {
        return this.userInfoId;
    }

}
